package forcollege.xly.com.xian.presenter;

import forcollege.xly.com.xian.base.BasePresenter;
import forcollege.xly.com.xian.model.ServiceData;
import forcollege.xly.com.xian.net.Request;
import forcollege.xly.com.xian.net.RetrofitApi;
import forcollege.xly.com.xian.vpinterface.LoginInterface;

/**
 * Created by xuleyuan on 2018/8/10
 */

public class LoginPresenter extends BasePresenter<LoginInterface, ServiceData> {

    @Override
    public Request<ServiceData> createRequest() {
        return new Request<ServiceData>()
                .setUrl(RetrofitApi.LOGIN)
                .setMethod(Request.POST);
    }

    @Override
    public void onGetResult(ServiceData data) {
        getBaseInterface().onLoginSuccess(data);
    }

}
